package com.ihr360.commons.model.type;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ihr360.commons.model.annotation.EnumData;
import com.ihr360.commons.serializer.jackson.EnumDataSerializer;

/** 法定福利类别 */
@EnumData
@JsonSerialize(using = EnumDataSerializer.class)
public enum BenefitCategory{
    /**
     * 社保类型
     */
    SI("社保"),
    /**
     * 公积金类型
     */
    HF("公积金"),
    /**
     * 养老保险
     */
    EI("养老保险");

    BenefitCategory(String title) {
        this.title = title;
    }

    @JsonCreator
    public static BenefitCategory factory(@JsonProperty(value = "id") String id) {
        return BenefitCategory.valueOf(id);
    }

    private String title;

    public String getTitle() {
        return title;
    }
}
